package nodes;


public class Connection 
{
	Node a;
	Node b;
	/**
	 * @param ia		One Node of the connection
	 * @param ib		The other Node of the connection
	 */
	public Connection(Node ia, Node ib)
	{
		a=ia;
		b=ib;
	}
	
	public Node getA() {return a;}
	public Node getB() {return b;}
	
	/**
	 * @param c		Connection with which to compare
	 * @return		true if the input is the same connection
	 */
	public Boolean equals(Connection c)
	{
		// returns true if c has both a and b
		// if a = a or be and if b = a or b then return true
		
		if ( (a==c.getA() || a==c.getB()) && (b==c.getA() || b==c.getB() ) )
		{
			return true;
		}
		return false;
	}
	
	public String toString() { return a + "," + b; }
	
}
